package com.ctbri.vSearch.service;

import com.ctbri.vSearch.frame.RedisPooledConnection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CountDownLatch;

import org.codehaus.jackson.map.ObjectMapper;

import com.ctbri.vSearch.bean.dto.ArticleAndTermScore;
import com.ctbri.vSearch.bean.dto.SearchItem;
import com.ctbri.vSearch.bean.po.ArticleItem;
import com.ctbri.vSearch.bean.po.GzItem;
import redis.clients.jedis.Jedis;

public interface DeepSearchServer {
	/***
	 * 搜索知识图
	 * @param countdownlatch
	 * @param word
	 * @param nodes
	 * @param links
	 * @param mapper
	 * @param category
	 */
	public void searchRelationMap(CountDownLatch countdownlatch,
			String word, List<String> nodes,List<String> links,	ObjectMapper mapper, 
			String[] category, Jedis client);
	
	/***
	 * 查询相关词
	 * @param word
	 * @return
	 */
	public Map<String, Double> searchRelatedWords(String word);
	
	/**
	 * 链接ES并做查询
	 */
	public void searchScoreModel(Map<String,Double> internalResults,ArticleAndTermScore articleAndTermScore, RedisPooledConnection rpc);
	
	public void dereplicationGzsAndArticles(List<SearchItem> searchItems,
			List<GzItem> gzItems,ArticleAndTermScore articleAndTermScore);
	
	/**
	 * 公众号去重
	 */
	public void dereplicationGzs();
	
	/**
	 * 文章去重
	 */
	public void dereplicationArticles();
	
	
}

